﻿@{
    ViewBag.Title = "Login";
}

<div id="content-top">
    <h2>@ViewBag.Title</h2>
    <h3><a href="/">back</a></h3>
    <span class="clearfix">&nbsp;</span>
</div>

<div class="box half align-left">
    <h3>Site Login</h3>

    <div class="box-container">
        <p>Use this login if you registered manually with your e-mail address.</p>

        @using (Html.BeginForm()) {
            @Html.ValidationSummary(true)
            @Html.ValidationMessage("error")
            @Html.AntiForgeryToken()

            <span class="clearfix">&nbsp;</span>
            
            <p>
                @Html.Label("E-mail Address") @Html.TextBox("Email", null, new { @class = "txtbox-full" }) @Html.ValidationMessage("Email")
            </p>
            <p>
                @Html.Label("Password") @Html.Password("Password", null, new { @class = "txtbox-full" }) @Html.ValidationMessage("Password")
            </p>

            <input type="submit" class="align-right" value="Login" />
        }

        <span class="clearfix">&nbsp;</span>
    </div>
</div>

@if (SimpleForum.Data.Services.ConfigurationService.OpenIDEnabled) {
    <div class="box half align-right">
        <h3>OpenID Login</h3>

        <div class="box-container">
            <p>Use an OpenID provider to login to this forum.</p>

            @using (Html.BeginForm("LoginOpenID", "User", FormMethod.Post, new { @class = "openid" })) {
                @Html.ValidationSummary(true)
                @Html.ValidationMessage("error")

                <div>
                    <ul class="providers">
                        <li class="openid" title="OpenID">
                            <img src="@Url.ThemeContent("Images/openid/openidW.png")" alt="icon" />
                            <span><strong>http://{your-openid-url}</strong></span>
                        </li>
                        <li class="direct" title="Google">
		                    <img src="@Url.ThemeContent("Images/openid/googleW.png")" alt="icon" />
                            <span>https://www.google.com/accounts/o8/id</span>
                        </li>
                        <li class="direct" title="Yahoo">
		                    <img src="@Url.ThemeContent("Images/openid/yahooW.png")" alt="icon" />
                            <span>http://yahoo.com/</span>
                        </li>
                        <li class="username" title="AOL screen name">
		                    <img src="@Url.ThemeContent("Images/openid/aolW.png")" alt="icon" />
                            <span>http://openid.aol.com/<strong>username</strong></span>
                        </li>
                        <li class="direct" title="Steam">
                            <img src="@Url.ThemeContent("Images/openid/steam.png")" alt="icon" />
                            <span>http://steamcommunity.com/openid</span>
                        </li>
                        <li class="username" title="MyOpenID user name">
		                    <img src="@Url.ThemeContent("Images/openid/myopenid.png")" alt="icon" />
                            <span>http://<strong>username</strong>.myopenid.com/</span>
                        </li>
                        <li class="username" title="Flickr user name">
		                    <img src="@Url.ThemeContent("Images/openid/flickr.png")" alt="icon" />
                            <span>http://flickr.com/<strong>username</strong>/</span>
                        </li>
                        <li class="username" title="Technorati user name">
                            <img src="@Url.ThemeContent("Images/openid/technorati.png")" alt="icon" />
                            <span>http://technorati.com/people/technorati/<strong>username</strong>/</span>
                        </li>
                        <li class="username" title="Wordpress blog name">
		                    <img src="@Url.ThemeContent("Images/openid/wordpress.png")" alt="icon" />
                            <span>http://<strong>username</strong>.wordpress.com</span>
                        </li>
                        <li class="username" title="Blogger blog name">
		                    <img src="@Url.ThemeContent("Images/openid/blogger.png")" alt="icon" />
                            <span>http://<strong>username</strong>.blogspot.com/</span>
                        </li>
                    </ul>
                </div>
                
                <fieldset>
                    <label for="openid_username">Enter your <span>Provider user name</span></label>
                    <div>
                        <span></span><input type="text" name="openid_username" />
                        <span></span><input type="submit" value="Login" />
                    </div>
                </fieldset>
                <fieldset>
                    <label for="openid_identifier">Enter your <a class="openid_logo" href="http://openid.net">OpenID</a></label>
                    <div>
                        <input type="text" name="openid_identifier" />
                        <input type="submit" value="Login" />
                    </div>
                </fieldset>
            }

            <span class="clearfix">&nbsp;</span>
        </div>
    </div>
}

<span class="clearfix">&nbsp;</span>

@if (SimpleForum.Data.Services.ConfigurationService.OpenIDEnabled) {
    @Html.Resource(@<link rel="Stylesheet" href="@Url.ThemeContent("CSS/openid.css")" />, "css")
    @Html.Resource(@<script type="text/javascript" src="@Url.ThemeContent("JS/jquery.openid.js")"></script>, "js")
    @Html.Resource(@<script type="text/javascript">
        $(document).ready(function () {
            $('form.openid').openid();
        });
    </script>, "js")
}